Steve Souders has recently released something like a sequel to his previous book “High Performance Web Sites” (HPWS) which I have already reviewed earlier. With Even Faster Web Sites he and his co-authors (specialists in their fields, such as Doug Crockford (JavaScript: The Good Parts) on Javascript) elaborate on some of the rules Steve postulated in HPWS.
It needs to be stated first that if you haven’t read and followed Steve’s first book, you should go and do that first. It’s a must-read that makes it pretty easy to understand why your page might be slow and how to improve it.
In “Even Faster Web Sites”, Steve and his co-authors walk a fine line between fast and maintainable code. While most techniques described in his first book could be integrated with an intelligent deployment process, it is much harder with “Even Faster Web Sites”.
In the chapters that Steve wrote himself for “Even Faster Web Sites,” he is pretty much obsessed with analyzing when, in what sequence, and how parallel the parts of a web page are loaded. Being able to have resources transfered in parallel lead to the highest gains in page loading speed. The enemy of the parallel download is the script tag, so Steve spends (like in HPWS but in greater detail in this book) quite a few pages analyzing which technique of embedding external scripts lead to which sequence in loading the resources of the page.
Steve also covers interesting techniques such as ways to split the initial payload of a web site (lazy loading) and also chunked HTTP responses into consideration that allow sending back HTTP responses even before the script has finished. Downgrading to HTTP/1.0 can only be considered as hard-core technique that just huge sites such as Wikipedia are using right now and should be considered being covered for educational reasons only.
There is a section focussing on Optimizing Images which thankfully takes the deployment process into consideration and shows how to automate the techniques they suggest to optimize the images.
My only real disappointment with “Even Faster Web Sites” is the section by Nicolas C. Zakas. He writes about how to Write Efficient JavaScript but fails to prove it. To be fair: in the first section of the chapter he shows benchmarks and draws conclusions that I can confirm in the real world (accessing properties of objects and their child-objects can be expensive). But then he gives advice for writing code that can hardly be called maintainable (e.g. re-ordering and nesting if-statements (!), re-writing loops as repeated statements (!!!)) and then doesn’t even prove that this makes the code any faster. I suspect that the gains of these micro-optimizations are negligible, so chapters like these should be (if at all) included in an appendix.
Speaking of appendices, I love what Steve has put in here: he shows a selection of the finest performance tools that can be found in the field.
This book can help you make your site dangerously fast. You also need to be dangerously careful what tips you follow and how you try to keep your site maintainable at the same time. “Even Faster Web Sites” is great for people who can’t get enough of site optimization and therefore a worthy sequel to “High Performance Web Sites,” but just make sure that you also read and follow Steve’s first book first.
The book has been published by O’Reilly in June 2009, ISBN 9780596522308.